Automation events enable automations to progress based on events from outside sources. An event system allows automations to come to a halt until a certain event occurs. When the event occurs the automation may process the event and then progress.
Note: For more on the event system from a developer perspective refer to IAP Event Systemin the IAP Developer guide. This will explain how to define/create events, as well as how to define event handlers in code.
Creating an Automation Event Listener
To create an eventListener
:
Add an
eventListener
task to the Automation Builder canvas. This task type can be found under theWorkFlowEngine
section of the Automation Builder sidebar.Verify the purple
eventListener
task node is added to the canvas.Double-click the
eventListener
task. A New Event Listener dialog will display.Populate all the
New Event Listener
fields and then click Update.
Field Name | Description |
---|---|
Event Source | The name of the application that will be emitting the event. Note the namespace @killgore in front of helloworld . If this were from the Configuration Manager it would be @itential/app-configuration_manager . The event source matches the pronghorn.json id field. |
Event Topic | The name of the event defined in the "topics" section of the pronghorn.json file. This is the event that will progress the automation. See the IAP Event System link in the note above for defining events. |
Event Schema Filter | This is a required field that uses JSON schema to define and filter an event when it contains a particular piece of data. For instance, the listener will only respond to a test_pattern event when the name field is "michael". |
Event Schema Filter Example
{
"type": "object",
"required": [ "name" ],
"properties": {
"name": {
"enum": [ "michael" ]
}
}
}
Note: For the New Event Listener dialog that was shown above, the event listener will only progress the workflow if it receives the
test_pattern
event from the@killgore/helloworld
application and the payloadname
field has the value ofmichael
.
Running the Automation Event Listener
When a job is triggered from an automation containing one or more eventListener
tasks, the eventListener
task for that job will remain in a running
state until it receives the expected external event. The automation will progress when the external event is received.
Details to create an eventListener
task in automations for NSO NETCONF events can be found in the IAP Integrations guide for network adapters.